import os.path
from tqdm import tqdm
import cv2

img_fold_A = 'G:\\tmp'
save_fold_A="G:\\tmp"
img_list1 = os.listdir(img_fold_A)
num_imgs1 = len(img_list1)
for i in tqdm(range(num_imgs1)):
  name_A = img_list1[i]
  path_A = os.path.join(img_fold_A, name_A)
  im_A = cv2.imread(path_A, 1)
  file_name_temp = name_A[:-4]
  file_name = os.path.join(save_fold_A , file_name_temp+'.jpg')
  cv2.imwrite(file_name, im_A)
